<template>
  <div class="common-card">
    <div class="title">{{title}}</div>
    <div class="value">{{value}}</div>
    <div class="cart">
      <slot></slot>
    </div>
    <div class="line"></div>
    <div class="total">
      <slot name="total"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'CommonCard',
  props: {
    title: String,
    value: String
  }
}
</script>

<style lang="scss" scoped>
  .common-card {
    .title {
      font-size: 12px;
      color: #999
    }
    .value {
      font-size: 25px;
      color: #000;
      margin-top: 5px;
      letter-spacing: 1px;
    }
    .cart {
      height: 50px;
    }
    .line {
      margin: 10px 0;
      border-top: 1px solid #eee;
    }
    .total {
      font-size: 12px;
      color: #666;
    }
  }
</style>

<style lang="scss">
  .emphasis {
    margin-left: 5px;
    color: #333;
    font-weight: 700;
  }
  .increment {
    width: 0;
    height: 0;
    border-width: 4px;
    border-color: transparent transparent green transparent;
    border-style: solid;
    margin: 0 0 3px 5px;
  }
  .decrement {
    width: 0;
    height: 0;
    border-width: 4px;
    border-color: red transparent transparent transparent;
    border-style: solid;
    margin: 3px 0 0 5px;
  }
</style>